package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.ReturnValue;

/**
 * @author Bright Lee
 */
public final class ReturnStatement implements SqlControlStatement {

    private int beginIndex;
    private int endIndex;
    private ReturnValue returnValue;

    public ReturnStatement(int beginIndex, ReturnValue returnValue) {
        this.beginIndex = beginIndex;
        this.endIndex = returnValue.getEndIndex();
        this.returnValue = returnValue;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public ReturnValue getReturnValue() {
        return returnValue;
    }

}
